package com.logistics.mapper;

import com.logistics.entity.WarehouseStorage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface WarehouseStorageMapper {
    // 根据ID查询存储记录
    WarehouseStorage selectById(@Param("id") Long id);
    
    // 根据仓库ID查询存储记录
    List<WarehouseStorage> selectByWarehouseId(@Param("warehouseId") Long warehouseId);
    
    // 根据订单号查询存储记录
    List<WarehouseStorage> selectByOrderNo(@Param("orderNo") String orderNo);
    
    // 查询所有存储记录
    List<WarehouseStorage> selectAll();
    
    // 搜索存储记录
    List<WarehouseStorage> search(@Param("orderNo") String orderNo,
                                @Param("warehouseId") Long warehouseId,
                                @Param("status") String status);
    
    // 插入存储记录
    int insert(WarehouseStorage storage);
    
    // 更新存储记录状态
    int updateStatus(@Param("id") Long id, @Param("status") String status);
    
    // 删除存储记录
    int deleteById(@Param("id") Long id);
} 